from PyQt5.QtWidgets import *
from PyQt5.QtGui import*#界面常用组件
from PyQt5.QtCore import *
from PyQt5 import*
import  sys
import cgitb
cgitb.enable(format="text")

class Chess(QLabel):
    #isBlack为true表示黑色
    def __init__(self,isBlack,parent=None):
        super().__init__(parent)
        if isBlack:
            self.color="black"
        else:
            self.color="white"
        self.pic=None
        if self.color=="black":
            self.pic=QPixmap("./source/黑子.png")
        else:
            self.pic=QPixmap("./source/白子.png")
        self.setPixmap(self.pic)
        self.setFixedSize(30,30)
